<!-- extends表明此页面继承自 base.html 文件 -->
{% extends "base.html" %}
{% load staticfiles %}
<!-- 写入 base.html 中定义的 title -->
{% block title %}
    留言信息
{% endblock title %}
<!-- 写入 base.html 中定义的 content -->
{% block content %}
<link href="{% static 'bootstrap/css/mlist.css' %}" rel="stylesheet" type="text/css" />
<!-- 定义放置文章标题的div容器 -->
<section class="comments">
<article class="comment">
  <!--<div class="comment-body">-->
  <!--</div>-->
</article>
      <div class="box1">
         <p>留言列表: </p>
      </div>
    <div class="box2">
        <a href="/form/"> <p>我要留言:</p></a>
    </div>
  <article class="comment">
   {% for obj in objs %}
  <a class="comment-img" href="#non">
    <img src="" alt="" width="50" height="50">
  </a>
  <div class="comment-body">
      <p class="attribution">&nbsp;<p class="attribution">{{obj.id}}楼 <a href="#non">{{obj.name}}</a></p>
        <div class="text">
            <p>{{ obj.text}}</p>
        </div>

      <p class="attribution">{{ obj.create_time }} &nbsp;<a href="{% url 'message:reply' obj.id%}"> 回复</a></p>

        {% for com in comObjs %}
            {% if obj.id == com.mid %}
            <div class="">
             <span class="box4">{{com.name}}</span>：<span class="">{{com.text}}</span>
             </div>
            <div class="attribution">
                {{ com.create_time }}
            </div>
            <br/>

            {% endif %}
        {% endfor%}


      {% if relay %}
          {% if uid == obj.id %}
            <form method="post" action="{% url 'message:commit' obj.id%}">
                {% csrf_token %}
               <div class="">
                   <input name="text" type="text">
                    <p><button type="submit" class="box3">提交</button></p>
               </div>
            </form>
          {% endif %}

      {% endif %}

        <HR style= " FILTER: progid:DXImageTransform.Microsoft.Glow ( color= #987cb9 ,strength = 10) " width= "100%" color= #987 cb9 SIZE =1>
  </div>
    {% endfor %}
  </article>

</article>
</section>
{% endblock content %}